package likou.offer;

/**
 * @Info: 斐波那契数列
 * @Author: 唐小尊
 * @Date: 2020/7/29  22:33
 */
public class _10_1 {
    public static void main(String[] args) {
        System.out.println(fib(100));

    }

    public static int fib(int n) {
        int a = 0, b = 1, sum;
        for(int i = 0; i < n; i++){
            sum = (a + b) % 1000000007;
            a = b;
            b = sum;
        }
        return a;
    }
}
